import request from '../utils/request'

export const apiGetList = (data: any) => {
    return request({
        url: '/api/getList',
        method: 'post',
        data
    })
}

export const getDetail = (data: { id: string }) => {
    return request({
        url: '/api/getDetail',
        method: 'post',
        data
    })
}

export const addShopCar = (data: {
    id?: string,
    img?: string[],
    title?: string,
    type?: number,
    price?: number,
    number?: number
}) => {
    return request({
        url: '/api/addShopCar',
        method: 'post',
        data
    })
}

export const getShopCar = () => {
    return request({
        url: '/api/getShopCar',
        method: 'post'
    })
}

export const apiLogin = (data: {
    username: string,
    password: string
}) => {
    return request({
        url: '/api/login',
        method: 'post',
        data
    })
}